import $ from 'jquery'
import './easySlider'
import './slider'
const answer = '100';
import {getbbb} from './utils'
console.log('我好像又恨你', getbbb)
export default () => {
  console.log(`the answer is ${answer}。`);
}

$("#slider").easySlider({
    slideSpeed: 500,
    autoSlide: true,
    paginationSpacing: "10px",
    paginationDiameter: "3px",
    paginationWidth: "60px",
    paginationPositionFromBottom: "0px",
    slidesClass: ".slides",
    controlsClass: ".controls",
    paginationClass: ".pagination"
});

$(".page6-top li").mousemove(function () {
    $(".page6-top li").removeClass("sel");
    $(this).addClass("sel");
    $(".page6-cont ul").hide();
    $(".page6-cont ul").eq($(this).index()).show();
})


$(".nav-ul li").click(function () {
    $(".nav-ul li").removeClass("xz");
    $(this).addClass("xz");
})

$("#previous").mousemove(function () {
    $(this).attr('src', 'image/banner-left1.png');
}).mouseleave(function () {
    $(this).attr('src', 'image/banner-left.png');
})
$("#next").mousemove(function () {
    $(this).attr('src', 'image/banner-right1.png');
}).mouseleave(function () {
    $(this).attr('src', 'image/banner-right.png');
})

$(window).scroll(function () {
    console.log("工作区高度" + window.screen.availHeight);
    console.log("滚动高度" + $(window).scrollTop())

    if ($(window).scrollTop() < 440) {
        $(".nav-ul li").removeClass("xz");
        $(".nav-ul li").eq(0).addClass("xz");
    }

    if ($(window).scrollTop() > 3200) {
        $(".nav-ul li").removeClass("xz");
        $(".nav-ul li").eq(1).addClass("xz");
    }

    if ($(window).scrollTop() > 4200) {
        $(".nav-ul li").removeClass("xz");
        $(".nav-ul li").eq(2).addClass("xz");
    }

    if ($(window).scrollTop() > 5000) {
        $(".nav-ul li").removeClass("xz");
        $(".nav-ul li").eq(3).addClass("xz");
    }
});

$("#login").click(function () {
    window.open('https://pmanage.mp.xmz1.com/#/login')
})

$("#register").click(function () {
    window.open('https://pmanage.mp.xmz1.com/#/register')
})